// import request from '@/utils/request'
import request from '@/utils/request'

// 工具栏学科名称下拉框渲染
export function getSubject() {
  return request({
    url: '/subject/tree'

  })
}

// 表格渲染
export function getInfo(params) {
  return request({
    method: 'GET',
    url: '/exam/exam',
    params
  })
}

// 新增考试
export function addExam(data) {
  return request({
    url: '/exam/exam',
    method: 'POST',
    data
  })
}

// 渲染 编辑按钮弹出框
export function getLookClass(params) {
  return request({
    url: '/class/class?subject_id=1&state=1',
    method: 'GET',
    params
  })
}
// 删
export const delExamListApi = (id) => {
  return request({
    url: `/exam/exam/${id}`,
    method: 'DELETE'
  })
}
// 推送班级/解除班级 绑定
export const bindClass = (data) => {
  return request({
    url: `/exam/exam/bindClass`,
    method: 'POST',
    data
  })
}
